package com.base.service.impl;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.base.mapper.voipmapper.WithdrawalsMapper;
import com.base.po.voip.Withdrawals;
import com.base.service.WithdrawalsService;
import com.base.utils.Page;

@Service("withdrawalsService")
public class WithdrawalsServiceImpl implements WithdrawalsService {

	@Autowired
	private WithdrawalsMapper withdrawalsMapper;

	@Override
	public int deleteByPrimaryKey(String id) {
		return withdrawalsMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Withdrawals record) {
		return withdrawalsMapper.insert(record);
	}

	@Override
	public int insertSelective(Withdrawals record) {
		return withdrawalsMapper.insertSelective(record);
	}

	@Override
	public Withdrawals selectByPrimaryKey(String id) {
		return withdrawalsMapper.selectByPrimaryKey(id);
	}

	@Override
	public int updateByPrimaryKeySelective(Withdrawals record) {
		return withdrawalsMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Withdrawals record) {
		return withdrawalsMapper.updateByPrimaryKey(record);
	}

	@Override
	public BigDecimal selectAllMoney(String parentid, Date begin, Date end) {
		return withdrawalsMapper.selectAllMoney(parentid, begin, end);
	}

	@Override
	public int countAll(String parentid, Date begin, Date end) {
		return withdrawalsMapper.countAll(parentid, begin, end);
	}

	@Override
	public float countByAlready(String userid, Integer type, Integer status) {
		return withdrawalsMapper.countByAlready(userid, type, status);
	}

	@Override
	public float countByAlreadyTime(String userid, Integer type, Date begin, Date end) {
		return withdrawalsMapper.countByAlreadyTime(userid, type, begin, end);
	}

	@Override
	public int selectByCount(String userid) {
		return withdrawalsMapper.selectByCount(userid);
	}

	@Override
	public List<Withdrawals> selectByAll(Page page, String userid) {
		return withdrawalsMapper.selectByAll(page, userid);
	}

	@Override
	public List<Withdrawals> selectByStatus(Integer status, String userid, Integer type) {
		return withdrawalsMapper.selectByStatus(status, userid, type);
	}

}
